package com.example.lushiping2.service;

import com.example.lushiping2.bean.Person;
import com.example.lushiping2.mapper.HelloMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HelloService {

    @Autowired
    HelloMapper helloMapper;

    public List<Person> getAllPerson(){
        return helloMapper.getAllPerson();
    }

    public Person getPerson(Integer id){
        return helloMapper.getPerson(id);
    }

    public void insertPerson(String username,String userpasswd){
        helloMapper.insertPerson(username,userpasswd);
    }

    public Person selectUsername(String username,String userpasswd){
        return helloMapper.selectUsername(username,userpasswd);
    }
}
